home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / dslibrary.lha / ds.library / autodocs / ds.doc next >
Text File  |  1997-02-13  |  3KB  |  129 lines

  1. TABLE OF CONTENTS
  2.  
  3. ds.library/DS_BTreeOpen
  4. ds.library/DS_BTreeClose
  5. ds.library/DS_BTreeInsert
  6. ds.library/DS_BTreeDelete
  7. ds.library/DS_BTreeGetEntry
  8. ds.library/DS_BTreeOpen                          ds.library/DS_BTreeOpen
  9.  
  10.    NAME
  11.     DS_BTreeOpen -- open or create a new b-tree on disk (V37)
  12.  
  13.    SYNOPSIS
  14.     result = DS_BTreeOpen(btree,filename,keysize,datasize,comparefunction);
  15.     D0                    D1    D2       D3      D4       D5
  16.     
  17.     int DS_BTreeOpen(BTREE *, char *, int, int, (*int)(void *,void *) );
  18.  
  19.    FUNCTION
  20.     Opens or creates a b-tree on disk with the filename and the corresponding
  21.     keysize and datasize. The comparefunction is used to compate two keys/entries.
  22.  
  23.    INPUTS
  24.     btree    - a pointer to a variable of type BTREE
  25.     keysize  - an integer value telling the size of the key
  26.     datasize - an integer value for the size of the whole data structure to
  27.             be stored in the file
  28.     comparefunction - a pointer to a function awaiting two parameters; this
  29.             function returns 1 if argument 1 is greater than argument 2, 
  30.             it returns 0 if both arguments are equal, and it return -1 else.
  31.  
  32.    RESULT
  33.     result  - 1 if the b-tree could be opened or created,
  34.             0 if something went wrong
  35.  
  36.    SEE ALSO
  37.     DS_BTreeClose
  38.  
  39. ds.library/DS_BTreeClose                         ds.library/DS_BTreeClose
  40.  
  41.    NAME
  42.     DS_BTreeClose -- close a b-tree on disk
  43.  
  44.    SYNOPSIS
  45.     DS_BTreeClose(btree)
  46.                   D1
  47.  
  48.     void DS_BTreeClose(BTREE);
  49.  
  50.    INPUTS
  51.     btree - the tree to be closed.
  52.     
  53.    RESULT    
  54.     none
  55.     
  56.    SEE ALSO
  57.     DS_BTreeOpen()
  58.  
  59. ds.library/DS_BTreeInsert                        ds.library/DS_BTreeInsert
  60.  
  61.    NAME
  62.     DS_BTreeInsert -- insert a node into the b-tree
  63.  
  64.    SYNOPSIS
  65.     result = DS_BTreeClose(btree,key,data)
  66.     D0                     D1    D2  D3
  67.  
  68.     int DS_BTreeClose(BTREE, void *, void *);
  69.  
  70.    INPUTS
  71.     btree   - the b-tree on disk
  72.     key     - a pointer to the key of the data to be inserted.
  73.     data    - a pointer to the the data structure to be inserted.
  74.     
  75.    RESULT    
  76.     result  - 1 if key could be inserted.
  77.             0 if key was already present in b-tree
  78.     
  79.    SEE ALSO
  80.     DS_BTreeDelete()
  81.  
  82. ds.library/DS_BTreeDelete                        ds.library/DS_BTreeDelete
  83.  
  84.    NAME
  85.     DS_BTreeDelete -- delete a node from a b-tree on disk
  86.  
  87.    SYNOPSIS
  88.     result = DS_BTreeClose(btree, key)
  89.     D0                     D1     D2
  90.  
  91.     int DS_BTreeClose(BTREE, void *);
  92.  
  93.    INPUTS
  94.     btree   - the b-tree on disk
  95.     key     - a pointer to the key of the data structure to be deleted.
  96.         
  97.    RESULT    
  98.     result  - 1 if key is deleted
  99.             0 if key was not in the b-tree
  100.     
  101.    SEE ALSO
  102.     DS_BTreeInsert()
  103.  
  104. ds.library/DS_BTreeGetEntry                      ds.library/DS_BTreeGetEntry
  105.  
  106.    NAME
  107.     DS_BTreeGetentry -- get an entry from a b-tree on disk
  108.  
  109.    SYNOPSIS
  110.     result = DS_BTreeClose(btree, key, buffer)
  111.     D0                     D1     D2   D3
  112.  
  113.     int DS_BTreeClose(BTREE, void *, void *);
  114.  
  115.    INPUTS
  116.     btree   - the b-tree on disk
  117.     key     - a pointer to the key of the data structure to get.
  118.     memory  - a pointer to a memory area where the data will be copied to.
  119.             rememer: this area MUST be large enough !
  120.         
  121.    RESULT    
  122.     result  - 1 if key was found and data copied
  123.             0 if key was not in the b-tree
  124.     
  125.    SEE ALSO
  126.     DS_BTreeInsert(), DS_BTreeDelete()
  127.  
  128.  
  129.